package com.bootdo.system.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.bootdo.system.dao.ContentDao;
import com.bootdo.system.domain.ContentDO;
import com.bootdo.system.service.ContentService;



@Service
public class ContentServiceImpl implements ContentService {
	@Autowired
	private ContentDao contentDao;
	
	@Override
	public ContentDO get(Integer id){
		return contentDao.get(id);
	}
	
	@Override
	public List<ContentDO> list(Map<String, Object> map){
		return contentDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return contentDao.count(map);
	}
	
	@Override
	public int save(ContentDO content){
		content.setCreateDate(new Date());
		return contentDao.save(content);
	}
	
	@Override
	public int update(ContentDO content){
		content.setCreateDate(new Date());
		return contentDao.update(content);
	}
	
	@Override
	public int remove(Integer id){
		return contentDao.remove(id);
	}
	
	@Override
	public int batchRemove(Integer[] ids){
		return contentDao.batchRemove(ids);
	}

	@Override
	public ContentDO getContent(Long menuId) {
		return contentDao.getContent(menuId);
	}

}
